// 线性查找
function seqSearch (arr, value) {
    for (let i = 0; i < arr.length; i++) {
        if (arr[i] === value) {
            return i
        }
    }
    return -1
}

function main () {
    let arr = [1, 9, 11, -1, 34, 89]
    let index = seqSearch(arr, 9)
    console.log(index)
}

main()